//
//  MovieList.m
//  UI_豆瓣
//
//  Created by WangZe on 15/10/12.
//  Copyright © 2015年 王泽龙. All rights reserved.
//

#import "MovieList.h"

@implementation MovieList
- (void)dealloc
{
    [_movieId release];
    [_movieName release];
    [_pic_url release];
    [super dealloc];
}

- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.movieId forKey:@"movieID"];
    [aCoder encodeObject:self.movieName forKey:@"name"];
    [aCoder encodeObject:self.pic_url forKey:@"pic"];
    
}
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];
    if (self) {
        self.movieId = [aDecoder decodeObjectForKey:@"movieID"];
        self.movieName = [aDecoder decodeObjectForKey:@"name"];
        self.pic_url = [aDecoder decodeObjectForKey:@"pic"];
        
    }
    return self;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"movieid"]) {
        self.movieId = value;
    }
}
@end
